﻿using System.Drawing;
using System.Windows.Forms;
namespace TuoPu镭雕机注册SN并过站
{
    class dataGridviewUI
    {
        public void UI(DataGridView dt)
        {
            // Alternating row style
            dt.AlternatingRowsDefaultCellStyle = new DataGridViewCellStyle
            {
                BackColor = Color.LightCyan
            };

            // Column header style
            dt.ColumnHeadersDefaultCellStyle = new DataGridViewCellStyle
            {
                Alignment = DataGridViewContentAlignment.MiddleCenter,
                BackColor = Color.FromArgb(211, 223, 240),
                Font = new Font("Arial", 10F, FontStyle.Regular, GraphicsUnit.Point, 134),
                ForeColor = Color.Navy,
                SelectionBackColor = SystemColors.Highlight,
                SelectionForeColor = SystemColors.HighlightText
            };

            dt.AllowUserToDeleteRows = false;
            dt.BackgroundColor = Color.White;
            dt.BorderStyle = BorderStyle.Fixed3D;
            dt.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
            dt.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            dt.EnableHeadersVisualStyles = false;
            dt.GridColor = SystemColors.GradientInactiveCaption;
            dt.RowTemplate.Height = 23;
            dt.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }
    }
}
